﻿using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Text; 
using Newtonsoft.Json;
using T.ServiceComponent.Database.Service;
using T.FAS.Runtime.DataModel.Dao;
using T.FAS.Runtime.Metadata.Entity.DataModel;
using T.FAS.Runtime.Metadata.Entity;

namespace T.FAS.Runtime.DataModel.Dao
{
    /// <summary>
    /// 元数据验证接口
    /// </summary>
    public interface IMetaDataDesignValidator
    {
        /// <summary>
        /// 创建前检查
        /// </summary>
        /// <param name="metaDataContent"></param>
        /// <returns></returns>
        bool CreateMetadata(IMetaDataContent metaDataContent);
        /// <summary>
        /// 更新前检查
        /// </summary>
        /// <param name="metaDataContent"></param>
        /// <returns></returns>
        bool UpdateMetadata(IMetaDataContent metaDataContent);
        /// <summary>
        /// 删除前检查
        /// </summary>
        /// <param name="metaDataContent"></param>
        /// <returns></returns>
        bool DeleteMetadata(IMetaDataContent metaDataContent);
        /// <summary>
        /// Get查询结果后检查
        /// </summary>
        /// <param name="metaDataContent"></param>
        /// <returns></returns>
        bool GetMetadata (IMetaDataContent metaDataContent);
    }

    /// <summary>
    /// 验证时态
    /// </summary>
    public enum ValidateTense
    {
        Design = 0,
        Runtime = 1,
    }

    /// <summary>
    /// CRUD
    /// </summary>
    public enum CRUDType
    {
        Create,
        Retrive,
        Update,
        Delete,
    }
}
